<%--
  Created by IntelliJ IDEA.
  User: HASEE
  Date: 2021/2/20
  Time: 14:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>开始页面</title>
    <script type="text/javascript" src="js/myjQuery.js"></script>
    <script>
        $(function () {
            $("#btn01").click(function(){
                $.ajax({
                    url:"play",
                    type:"get",
                    data:{
                        name:"lihonglei",
                        age:21,
                        money:4999
                    },
                    dataType:"json",
                    success(resp){
                        $("#div01").html(resp)
                        alert(resp.name)
                    }
                })
            })

        })
    </script>
</head>
<body>
    <center>
         <h5 style="color: cornflowerblue">整治</h5>

        <input type="button" id="btn01" value="前端的局部刷新，不涉及请求"><br>


        <div id="div01" style="width: 100px;height: 100px;background-color: pink">

        </div>
        <div id="div02" style="width: 100px;height: 100px;background-color: coral">
        来不及道离别
        </div>

        <form action="/01_ajax/some" method="get">
            姓名<input type="text" name="name"><br>
            年龄<input type="text" name="age"><br>
            <input type="submit" value="试试">
        </form>
    </center>

</body>
</html>
